package com.project.controller;

import com.project.bean.GradeBean;
import com.project.service.IGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("grade")
public class GradeController {
    @Autowired
    private IGradeService service;

    @RequestMapping("findAll")
    public List<GradeBean> findAll(){
        return service.findAll();
    }

    @RequestMapping("findByRole")
    public List<GradeBean> findByRole(int[] roleArray){

        return service.findByRole(roleArray);
    }
}
